b560f4
@@ -21,6 +21,7 @@
 import org.apache.hadoop.hive.ql.util.JavaDataModel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError;
 import org.apache.hadoop.hive.ql.exec.vector.mapjoin.hashtable.VectorMapJoinHashTable;
 
 public abstract class VectorMapJoinFastHashTable implements VectorMapJoinHashTable {
@@ -47,7 +48,7 @@
   public static final int ONE_SIXTH_LIMIT = HIGHEST_INT_POWER_OF_2 / 6;
 
   public void throwExpandError(int limit, String dataTypeName) {
-    throw new RuntimeException(
+    throw new MapJoinMemoryExhaustionError(
         "Vector MapJoin " + dataTypeName + " Hash Table cannot grow any more -- use a smaller container size. " +
         "Current logical size is " + logicalHashBucketCount + " and " +
         "the limit is " + limit + ". " +
